package com.mysoft.gfyx.workbench.mip;

import com.mingyuanyun.sdk.mip.annotation.MipAuth;
import com.mingyuanyun.sdk.mip.client.IHttpApi;
import com.mingyuanyun.sdk.mip.enm.MipAuthType;
import com.mysoft.gfyx.workbench.mip.dto.BasicYcgListResponseDto;
import com.mysoft.gfyx.workbench.mip.dto.GetUserAuthTokenRequestDto;
import com.mysoft.gfyx.workbench.mip.dto.GetUserAuthTokenResponseDto;
import com.mysoft.gfyx.workbench.mip.dto.GetUserSsoUrlResponseDto;
import feign.Headers;
import feign.Param;
import feign.RequestLine;

@MipAuth(MipAuthType.OAUTH2)
public interface YcgApiMipService extends IHttpApi {
    @RequestLine("POST /ycg-api/user/get-supplier-token-by-saas")
    @Headers("Content-Type: application/json")
    GetUserAuthTokenResponseDto getSupplierTokenBySaas(GetUserAuthTokenRequestDto dto);

    @RequestLine("POST /ycg-api/user/get-supplier-sso-url")
    @Headers("Content-Type: application/json")
    GetUserSsoUrlResponseDto getSupplierUserSsoUrl(GetUserAuthTokenRequestDto dto);

    @RequestLine("GET /ycg-api/supplier/business-opportunity?auth-token={token}&s_type=all&page_size={pageSize}&page={page}")
    @Headers("Content-Type: application/json")
    BasicYcgListResponseDto GetUserBusinessOpportunity(
            @Param("token") String keyword,
            @Param("pageSize") Integer pageSize,
            @Param("page") Integer page
    );
}
